package com.wanggsx.library.util.fun.media.jzplayer;

import android.content.Context;
import android.util.AttributeSet;

import cn.jzvd.JzvdStd;

public class MyPlayer extends JzvdStd {

    public void setOnComplationListener(OnComplationListener mComplationListener) {
        this.mComplationListener = mComplationListener;
    }

    private OnComplationListener mComplationListener;

    public interface OnComplationListener{
        void onComplation();
    }

    public MyPlayer(Context context) {
        super(context);
    }

    public MyPlayer(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public void onStateAutoComplete() {
        super.onStateAutoComplete();
        if (mComplationListener!=null){
            mComplationListener.onComplation();
        }
    }

    @Override
    public void onAutoCompletion() {
        super.onAutoCompletion();
    }

    @Override
    public void onStatePreparing() {
        super.onStatePreparing();
    }

}
